﻿using Aliphant.Common.Tools;
using DataModel.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CuteWallpaperDemo.Managers
{
    public class AppManager : Singleton<AppManager>
    {
        public List<WallpaperInfo> DeletateLists;

        public AppManager()
        {
            DeletateLists = new List<WallpaperInfo>();
        }

        public void Release()
        {
            foreach (var wallpaper in DeletateLists)
            {
                var dir = wallpaper.Dir;
                if (Directory.Exists(dir))
                {
                    Directory.Delete(dir, true);
                }
            }
        }
    }
}
